﻿<Window x:Class="InstantSpine.WPFPlayGround.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:c="clr-namespace:InstantSpine.WPFPlayGround"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        Title="MainWindow" Height="400" Width="250"
        Name="window">
    <Window.Resources>
        <c:Zeug x:Key="zeug"/>
        <c:ExpObj x:Key="exp"/>
        <c:TestDinger x:Key="dinger"/>
    </Window.Resources>
    <StackPanel Margin="5,5,5,5">
        <StackPanel.LayoutTransform>
            <ScaleTransform CenterX="0" CenterY="0" ScaleX="{Binding ElementName=slidr, Path=Value}" ScaleY="{Binding ElementName=slidr, Path=Value}"/>
        </StackPanel.LayoutTransform>
        <Button Margin="2,2,2,2">Huhu</Button>
        <Button Margin="2,2,2,2">Blabla</Button>
        <Button Margin="2,2,2,2" FontWeight="Bold">Click me...</Button>
        <ComboBox Margin="2,2,2,2" SelectedIndex="0">
            <ComboBoxItem>Lin elastic</ComboBoxItem>
            <ComboBoxItem>Hyper elastic</ComboBoxItem>
        </ComboBox>
        <Slider x:Name="slidr" Minimum="0.5" Maximum="4.0" Value="1.0"></Slider>
        <StackPanel Orientation="Horizontal">
            <Label>Scale factor:</Label>
            <Label Content="{Binding ElementName=slidr, Path=Value, StringFormat=F3}"/>
        </StackPanel>
        <ComboBox x:Name="diebox" SelectedIndex="0">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="Name: "/>
                        <TextBlock Text="{Binding Path=Name}" Margin="0,0,10,0"/>
                        <TextBlock Text="Age: "/>
                        <TextBlock Text="{Binding Path=Age}"/>
                    </StackPanel>
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <ComboBox ItemsSource="{Binding Source={StaticResource ResourceKey=zeug}, Path=ValidNums}" />
        <xctk:PropertyGrid SelectedObject="{Binding Source={StaticResource exp}}" AutoGenerateProperties="True" DisplaySummary="False" ShowSearchBox="False" ShowSortOptions="False" IsCategorized="False"/>
        <DataGrid ItemsSource="{Binding Source={StaticResource dinger}, Path=Dinger}" AutoGenerateColumns="False">
            <DataGrid.RowHeaderStyle>
                <Style TargetType="DataGridRowHeader">
                    <Setter Property="Content" Value="{Binding Name}"/>
                </Style>
            </DataGrid.RowHeaderStyle>
            <DataGrid.Columns>
                <DataGridTextColumn Header="Age" Binding="{Binding Age}"/>
                <DataGridTextColumn Header="Name" Binding="{Binding Name}"/>
            </DataGrid.Columns>
        </DataGrid>
    </StackPanel>    
</Window>
